<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生命周期</title>
    <style>
        .active{
            color: red;
        }
    </style>
    <link rel="stylesheet" href="./css/bootstrap.min.css">
</head>

<body>
    <div id="app">
        <h1>{{title}}</h1>
        <p>姓名：{{user.name}}</p>fav
        <p>年龄：{{user.age}}</p>
        <p>爱好：{{user.fav}}</p>
        <div>
            {{button}}
        </div>
        <div v-html="button"></div>
        <input type="text" v-model='content'>
        <div v-html="content"></div>

        <div v-bind:class="divClass" >
            divClassName
        </div>
        <button class="btn btn-warning" v-bind:disabled="disabled" v-bind:type="buttonType">按钮</button>
        <p>{{msg.toUpperCase() + ['w','o','r','l','d'].join('')}}</p>
    </div>
    
    <script src="./js/vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                title: "用户基本信息",
                user: {
                    name: "周杰伦",
                    age: 26,
                    fav: ['唱歌','跳舞','打篮球']
                },
                button:"<button>点赞</button>",
                content:'',
                divClass:"active",
                buttonType:'warnning',
                disabled:false,
                msg:"hello"
            }

        })
    </script>
</body>

</html>